home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / msdos / animutil / pvquan / quant / octree.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-30  |  1.5 KB  |  40 lines

  1. /************************************************************************
  2.  *                                                                      *
  3.  *                  Copyright (c) 1991, Frank van der Hulst             *
  4.  *                          All Rights Reserved                         *
  5.  *                                                                      *
  6.  * Authors:                                                             *
  7.  *    FvdH - Frank van der Hulst (Wellington, NZ)                       *
  8.  *                                                                      *
  9.  * Versions:                                                            *
  10.  *    V1.1 910626 FvdH - QUANT released for DBW_RENDER                  *
  11.  *    V1.2 911021 FvdH - QUANT released for PoV Ray                     *
  12.  *    V1.6 921023 FvdH - Produce multi-image GIFs                       *
  13.  *                     - Port to OS/2 IBM C Set/2                       *
  14.  *                                                                      *
  15.  ************************************************************************/
  16. /* octree.h -- definitions for octree.c */
  17.  
  18. #ifdef __GNUC__
  19. #define cdecl
  20. #endif
  21.  
  22. struct colorsum {
  23.     unsigned long r, g, b;
  24. };
  25.  
  26. typedef struct node * OCTREE;
  27. struct node {
  28.     unsigned char leaf;
  29.     unsigned char level;
  30.     unsigned char colorindex;
  31.     unsigned char children;
  32.     unsigned long colorcount;
  33.     struct colorsum rgbsum;
  34.     OCTREE nextreduceable;
  35.     OCTREE next[8];
  36. };
  37.  
  38. void generateoctree(void);
  39. UINT calc_palette(UINT i, double Cfactor);
  40.